# -*- coding: utf-8 -*-
# @Time: 2021/8/6 8:35
# @File: problem-8.py
# @DESC:
import re


class Solution:
    def myAtoi(self, s: str) -> int:
        return max(min(int(*re.findall('^[\+\-]?\d+', s.lstrip())), 2 ** 31 - 1), -2 ** 31)


temp = '+111%ddd'

print(re.findall('^[\+\-]?\d+', temp))
t = re.findall('^[\+\-]?\d+', temp)
type(t)
print(*t)

# data = [1, 2, 3, 4, 5, 6]
# print(*data)
